﻿using STT.Layer.Connection;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace STT.Profile.UserControlsHV
{
    public partial class UcTaiLieuHocTap : System.Web.UI.UserControl
    {
        ToolBox tb = new ToolBox();
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadTaiLieu();
        }
        private void LoadTaiLieu()
        {
            DataTable dt = new DataTable();
            dt = tb.GetDataTableById2("Get_InfoHocVien_byMahv", Session["MaFhv"].ToString());
            cpl.PageSize = 7;
            cpl.DataSource =  tb.GetDataTableById("TbTaiLieu_SelectByMaLop",dt.Rows[0]["MaLop"].ToString()).DefaultView;
            cpl.BindToControl = dtlTaiLieu;
            dtlTaiLieu.DataSource = cpl.DataSourcePaged;
            dtlTaiLieu.DataBind();
        }
    }
}